Skip to content

feat(deno): add anthropic integration#22468

Open
isaacs wants to merge 1 commit into
isaacs/deno-orchestrion-integrations-openaifrom
isaacs/deno-orchestrion-integrations-anthropic
Open

feat(deno): add anthropic integration#22468
isaacs wants to merge 1 commit into
isaacs/deno-orchestrion-integrations-openaifrom
isaacs/deno-orchestrion-integrations-anthropic

Conversation

@isaacs

@isaacs isaacs commented Jul 21, 2026

Copy link
Copy Markdown
Member

No description provided.

@isaacs
isaacs requested a review from a team as a code owner July 21, 2026 20:25
@isaacs
isaacs requested review from JPeer264 and andreiborza and removed request for a team July 21, 2026 20:25
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-anthropic branch from fcdda49 to 6581776 Compare July 21, 2026 20:55
@isaacs
isaacs requested a review from a team as a code owner July 21, 2026 20:55
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-openai branch from 9ea3b80 to 247a3be Compare July 21, 2026 20:55
@isaacs

isaacs commented Jul 21, 2026

Copy link
Copy Markdown
Member Author
IMG_3759

🤖😂

@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-anthropic branch from 6581776 to 40c51ca Compare July 21, 2026 21:31
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-openai branch from 247a3be to 166b082 Compare July 21, 2026 21:31
Comment on lines +69 to +72
Deno.test('anthropic instrumentation: orchestrion @anthropic-ai/sdk:chat channel produces a nested gen_ai span', async () => {
resetGlobals();
const sink = transactionSink();
init({

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Deno integration tests fail to reset the global installedIntegrations array, causing subsequent tests in the same file to skip crucial setupOnce() logic and fail.
Severity: MEDIUM

Suggested Fix

Update the resetGlobals() function used in the Deno integration test suites to also clear the installedIntegrations array from @sentry/core. This can be achieved by adding installedIntegrations.splice(0, installedIntegrations.length), ensuring each test runs with a clean integration state and setupOnce() is called correctly.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location:
dev-packages/deno-integration-tests/suites/orchestrion-anthropic/test.ts#L69-L72

Potential issue: The global `installedIntegrations` array is not reset between Deno
integration tests that run within the same file. When the first test initializes an
integration, it adds its name to this array. A subsequent test in the same file will
then skip the integration's `setupOnce()` function because the core `setupIntegration()`
logic sees the integration as already installed. This prevents necessary setup, such as
subscribing to channels, from occurring in the second test, causing it to fail when it
expects behavior configured in `setupOnce()`.

Also affects:

  • dev-packages/deno-integration-tests/suites/orchestrion-anthropic/test.ts:57~62

Did we get this right? 👍 / 👎 to inform future reviews.

@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-anthropic branch from 40c51ca to 3e3e6d2 Compare July 21, 2026 21:43
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-openai branch from 166b082 to 1b4d06d Compare July 21, 2026 21:43
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-anthropic branch from 3e3e6d2 to fd6c438 Compare July 22, 2026 00:51
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-openai branch from 1b4d06d to 6fd91f7 Compare July 22, 2026 00:51
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-anthropic branch from fd6c438 to 126e75d Compare July 22, 2026 14:42
@isaacs
isaacs requested review from a team as code owners July 22, 2026 14:42
@isaacs
isaacs requested review from chargome, msonnb and mydea and removed request for a team July 22, 2026 14:42
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-openai branch 2 times, most recently from c6b3064 to fb817bc Compare July 22, 2026 22:02
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-anthropic branch from 126e75d to 4c7f4ea Compare July 22, 2026 22:02
@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 27.79 kB - -
@sentry/browser - with treeshaking flags 26.23 kB - -
@sentry/browser (incl. Tracing) 46.31 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 48.06 kB - -
@sentry/browser (incl. Tracing, Profiling) 51.12 kB - -
@sentry/browser (incl. Tracing, Replay) 85.59 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.23 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 90.29 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 102.97 kB - -
@sentry/browser (incl. Feedback) 44.96 kB - -
@sentry/browser (incl. sendFeedback) 32.59 kB - -
@sentry/browser (incl. FeedbackAsync) 37.64 kB - -
@sentry/browser (incl. Metrics) 28.88 kB - -
@sentry/browser (incl. Logs) 29.11 kB - -
@sentry/browser (incl. Metrics & Logs) 29.8 kB - -
@sentry/react 29.59 kB - -
@sentry/react (incl. Tracing) 48.6 kB - -
@sentry/vue 33.22 kB - -
@sentry/vue (incl. Tracing) 48.28 kB - -
@sentry/svelte 27.81 kB - -
CDN Bundle 30.11 kB - -
CDN Bundle (incl. Tracing) 48.14 kB - -
CDN Bundle (incl. Logs, Metrics) 31.69 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.47 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 70.95 kB - -
CDN Bundle (incl. Tracing, Replay) 85.72 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 87.01 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 91.49 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.78 kB - -
CDN Bundle - uncompressed 89.77 kB - -
CDN Bundle (incl. Tracing) - uncompressed 144.84 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 94.48 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 148.82 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 219.24 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 264.08 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 268.04 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 277.78 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 281.74 kB - -
@sentry/nextjs (client) 51.13 kB - -
@sentry/sveltekit (client) 46.75 kB - -
@sentry/core/server 79.92 kB - -
@sentry/core/browser 51.9 kB - -
@sentry/node 124.4 kB -0.01% -1 B 🔽
@sentry/node (incl. diagnostics channel injection) 168.41 kB -0.01% -1 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 166 B - -
@sentry/node - without tracing 74.66 kB +0.01% +1 B 🔺
@sentry/aws-serverless 84.13 kB +0.01% +1 B 🔺
@sentry/cloudflare (withSentry) - minified 196.61 kB - -
@sentry/cloudflare (withSentry) 482.97 kB - -

View base workflow run

@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-anthropic branch from 4c7f4ea to a461cc4 Compare July 23, 2026 14:29
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-openai branch from fb817bc to d8e7ec0 Compare July 23, 2026 14:29
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-anthropic branch from a461cc4 to 8e978e0 Compare July 23, 2026 18:10
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-openai branch 2 times, most recently from 8dd1014 to d0dc945 Compare July 23, 2026 20:46
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-anthropic branch 2 times, most recently from ed7e0b4 to ff42590 Compare July 23, 2026 21:19
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-openai branch 2 times, most recently from 57223b7 to 4e5f815 Compare July 23, 2026 22:45
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-anthropic branch 2 times, most recently from 276d30f to dc5a1c5 Compare July 23, 2026 22:47
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-openai branch from 4e5f815 to ce918c2 Compare July 23, 2026 22:47
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-anthropic branch from dc5a1c5 to 8d03e54 Compare July 24, 2026 01:24
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-openai branch from ce918c2 to 118417c Compare July 24, 2026 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants